import java.util.ArrayList;

import processing.core.*;
import controlP5.*;

public class Canvas extends ControlCanvas{
	MainGroup parent;
	ArrayList<DrawObject> drawQueue;
	//DrawObject c,c2;
	float[] xBonds, yBounds;
	
	Canvas( MainGroup _parent) {
		parent = _parent;
		parent.theGroup.addCanvas(this);
		drawQueue = new ArrayList<DrawObject>();
		
		
		for( ControlCanvas i: drawQueue) {
			parent.theGroup.addCanvas(i);		 
		}		
	}
	
	public void draw( PApplet theApplet ) {
		
	}
	
	public void event(int mouseX, int mouseY) {
		for( DrawObject d: drawQueue) {
			if(d.handlePress(mouseX, mouseY))
				break;
		}
	}

}
